﻿@using EquipmentManager.Entities
@model EquipmentManager.Models.MainPageModel

@{
    ViewBag.Title = "Главная страница Оператора";
}


@section menu {
    <section class="featured">
            <div class="master-menu">
                @{Html.RenderPartial("OperatorMenu");}
            </div>
    </section>
}

<h2>Последнее добавленное оборудование за неделю (@Model.Equipments.Count)</h2>

<table class="bordered">
    <thead>
        <tr>
            <th>Инвентарный номер</th>
            <th>Серийный номер</th>
            <th>Название</th>
            <th>Описание</th>
            <th>Примечание</th>
            <th>Дата создания</th>
            <th>Перейти</th>
        </tr>
    </thead>
    @foreach (var equipment in Model.Equipments)
    {
        <tr>
            <td>@equipment.Number</td>
            <td>@equipment.SerialNumber</td>
            <td>@equipment.Name</td>
            <td>@equipment.Description</td>
            <td><pre>@equipment.Note</pre></td>
            <td>@equipment.CreatedDate</td>
            <td class="Center column-detail">@Html.ActionLink("Перейти", "Equipments", "Operator", new { PostOfficeId = equipment.PostOffice.Id }, new { @class = "common-btn BlueColor" })</td>
        </tr>
    }
</table>